import request from "/@/utils/request"

/**
 * index.view
 */
export function getCustomerByCard(obj?: Object) {
    return request({
        url: '/admin/PanoramicView/medicalCard',
        method: 'post',
        params: obj,
    });
}

export function sysVillageList() {
    return request({
        url: '/admin/PanoramicView/getVillage',
        method: 'get',
    });
}

export function getDoctorList() {
    return request({
        url: '/admin/PanoramicView/getFamilyDoctorList',
        method: 'get',
    });
}

/**
 * bloodView
 */
export function medicalViewPage(query?: Object) {
    return request({
        url: '/admin/PanoramicView/medicalViewPage',
        method: 'get',
        params: query
    })
}

export function medicalViewBloodStatisticalChart(params?: Object) {
    return request({
        url: '/admin/PanoramicView/medicalViewBloodStatisticalChart',
        method: 'get',
        params: params
    })
}


/**
 * drugView
 */
export function addCustomerDrug(obj?: Object) {
    return request({
        url: '/admin/PanoramicView/addCustomerDrug',
        method: 'get',
        params: obj
    })
}

export function delObjs(ids?: Object) {
    return request({
        url: '/admin/PanoramicView/deleteDrug',
        method: 'delete',
        data: ids
    })
}

export function fetchListDrug(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getCustomerDrug',
        method: 'get',
        params: query
    })
}

export function updateStatus(obj?: Object) {
    return request({
        url: '/admin/PanoramicView/updateStatus',
        method: 'post',
        data: obj
    })
}

/**
 * examView
 */
export function getdetaillist(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getExaminationData',
        method: 'get',
        params: query
    })
}

/**
 * illnessView
 */
export function fetchListIllness(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getCustomerIllness',
        method: 'get',
        params: query
    })
}


/**
 * roomView
 */
export function fetchListRoom(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getCustomerDirection',
        method: 'get',
        params: query
    })
}


/**
 * 获取字典数据
 */
// /admin/PanoramicView/type/{type}
export function getDictData(type: string) {
    return request({
        url: `/admin/PanoramicView/type/${type}`,
        method: 'get',
    })
}


///admin/PanoramicView/getDoctorDirectionPieChart
export function getDoctorDirectionPieChart(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getDoctorDirectionPieChart',
        method: 'get',
        params: query
    })
}

// /admin/PanoramicView/getDeptDirectionPieChart
export function getDeptDirectionPieChart(query?: Object) {
    return request({
        url: '/admin/PanoramicView/getDeptDirectionPieChart',
        method: 'get',
        params: query
    })
}
